package com.forum.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import org.springframework.stereotype.Component;

import java.time.*;
@Component
public class ArticleViews {
    @TableId(type = IdType.AUTO)
    private Integer id; // 记录ID
    private Integer articleId; // 文章ID
    private Integer userId; // 用户ID（可为空）
    private LocalDateTime createdAt; // 阅读时间

    public Integer getId() { return id; }
    public void setId(Integer id) { this.id = id; }
    public Integer getArticleId() { return articleId; }
    public void setArticleId(Integer articleId) { this.articleId = articleId; }
    public Integer getUserId() { return userId; }
    public void setUserId(Integer userId) { this.userId = userId; }
    public LocalDateTime getCreatedAt() { return createdAt; }
    public void setCreatedAt(LocalDateTime createdAt) { this.createdAt = createdAt; }
}
